$(function(){
	$(".datepicker").datepicker();
});

function newOne(){
	var data = $("#dayform").serialize();
	window.showModalDialog('reporter/daily/select-day?'+data,window);
}
function listResetDay(){
	var data = $("#dayform").serialize();
	var url='reporter/daily/arm-daliy-product-reporter!resetdays';
	doPost(url,data);
}

function saveResetDay(id,firstid,lastid){
	var url='reporter/daily/arm-daliy-product-reporter!saveResetDay';
	var first = $("#"+firstid).val();
	var last = $("#"+lastid).val();
	var data = "term="+id+"&lastDay="+last+"&firstDay="+first;
	$.post(url,data,function(){
		alert('结存日保存完毕');
	});
	
}
function removeOne(id){
	var url='reporter/daily/arm-daliy-product-reporter!removeresetday';
	var data='resetDay.id='+id;
	$.post(url,data,function(){
		listResetDay();
	});
	
}